/* 常用变量定义 */
@primary-color: #ff6600;

/* 初始化设置 */
* {
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style: none;
}

body {
    font: 14px/1.5 "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif;
    color: #333;
    background-color: #fff;
    min-width: 1364px;
    overflow-x: hidden;
}

/* header */
header {
    display: flex;
    position: relative;
    padding: 0 60px;
    height: 40px;
    font-size: 12px;
    z-index: 2;
    color: #b0b0b0;
    background-color: #333;

    nav ul {
        justify-self: flex-start;
        margin-right: 455px;
        line-height: 40px;

        li {
            float: left;
            cursor: pointer;


            &:hover {
                color: white
            }

            span {
                font-size: 14px;
                color: #6d6969;
                margin: 0 10px;
            }
        }
    }

    div.info ul {
        justify-self: flex-end;
        line-height: 40px;

        .cart {
            margin-left: 40px;
            display: inline-block;
            width: 73px;
            text-align: center;
            background-color: #424242;
        }

        li {
            float: left;
            cursor: pointer;

            &:hover {
                color: white
            }

            span {
                font-size: 14px;
                color: #6d6969;
                margin: 0 10px;
            }
        }
    }

    .cart:hover .cart-block {
        color: #b0b0b0;
        display: block;
        animation: slideDown 0.5s;
    }

    .cart-block {
        position: absolute;
        top: 40px;
        display: none;
        right: 60px;
        height: 100px;
        width: 325px;
        font-size: 14px;
        z-index: 3;
        background-color: #fff;
        box-shadow: 0 0 36px rgba(0, 0, 0, 0.1);
        text-align: center;
        line-height: 100px;
    }
}

/* 内容区 */
.wrapper {
    /* background-color: yellow; */
    margin: 0 60px;
    position: relative;
    z-index: 0;

    nav {
        display: flex;
        align-items: center;
        height: 100px;

        img.logo {
            width: 56px;
            height: 56px;
            background-color: @primary-color;
            margin-right: 50px;
        }

        .nav-list {
            a {
                font-size: 16px;
                color: #333333;
                margin-right: 12px;

                &:hover {
                    color: @primary-color
                }
            }
        }

        .nav-search input {
            width: 245px;
            height: 40px;
            padding: 0 10px;
            margin-left: 80px;
            border: 1px solid rgb(195, 195, 195);

            &:focus {
                outline: none;
                border: 1px solid @primary-color;
            }

        }

        .nav-search i {
            display: inline-block;
            width: 52px;
            height: 40px;
            font-size: 18px;
            line-height: 40px;
            color: #6b6a6a;
            margin: 0;
            text-align: center;
            border: 1px solid rgb(195, 195, 195);
            border-left: 0;
            transform: translate(-5px, 2px);
        }
    }

    .carousel {

        height: 460px;

        .carousel-info {
            position: absolute;
            z-index: 2;
            height: 420px;
            box-sizing: content-box;
            padding-top: 20px;
            padding-bottom: 20px;
            width: 234px;
            font-size: 14px;
            background-color: #333333;
            opacity: 0.7;


            ol li {
                padding-left: 42px;

                &::after {
                    content: ">";
                    display: float;
                    color: white;
                    font-size: 18px;
                    font-weight: 1000;
                    float: right;
                    transform: translate(-10px, 8px);
                }

                &:hover {
                    background-color: @primary-color;
                }

                a {
                    color: #ffffff;
                    display: inline-block;
                    text-align: center;
                    line-height: 42px;
                    text-decoration: none;


                }
            }
        }

        .swiper-container {
            position: absolute;
            z-index: 1;
            width: 1244px;


            .swiper-button-prev {
                color: white;
                transform: translate(240px, 0);
            }

            .swiper-button-next {
                color: white;
            }
        }

    }

    .ads {
        height: 345px;

        .ads-multiple {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            margin-bottom: 10px;

            img {
                width: 301px;
                height: 170px;
            }
        }

        img {
            width: 1242px;
            margin-bottom: 10px;
        }
    }
}

/* 展示区 */
.items {
    height: 708px;
    background-color: #f5f5f5;

    h1 {
        margin-left: 60px;
        margin-top: 30px;
        font-weight: lighter;
    }

    div.item {
        display: flex;

        .item-cards {
            margin-left: 20px;
            width: 982px;
            height: 614px;
            transform: translate(0, 20px);
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-template-rows: repeat(2, 1fr);
            gap: 15px;

            .card {
                display: flex;
                flex-direction: column;
                align-items: center;
                background-color: #fff;
                transition: all 0.2s linear;

                &:hover {
                    transform: translateY(-5px) scale(1.02);
                    box-shadow: 0 0 36px rgba(0, 0, 0, 0.1);
                }

                span:first-of-type {
                    background-color: #83c44e;
                    color: white;
                    padding: 1px 15px;
                }

                p:first-of-type {
                    font-size: 14px;
                    color: #333333;
                    margin-bottom: 5px;
                }

                p:last-of-type {
                    font-size: 12px;
                    color: #b0b0b0;
                    margin-bottom: 20px;
                }

                span:last-of-type {
                    color: @primary-color
                }
            }
        }
    }
}

/* 尾部 */
footer {
    height: 272px;
    width: 1240px;
    margin-left: 60px;
    padding-top: 30px;

    span {
        font-size: 16px;
        color: #333333;
        line-height: 25px;
        display: inline-block;
        width: 240px;
        text-align: center;
        border-right: 1px solid #e0e0e0;
    }

    span:last-of-type {
        border: 0;
    }

    hr {
        border: none;
        background-color: #e0e0e0;
        height: 1px;
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .footer-links {
        display: flex;

        ol {
            width: 160px;

            .link-title {
                font-size: 16px;
                color: #424242;
                margin-bottom: 15px;


                &:hover {
                    color: #424242;
                    cursor: text;
                }
            }

            li {
                color: #757575;
                margin-bottom: 8px;


                &:hover {
                    color: @primary-color;
                    cursor: pointer;
                }
            }
        }

        .footer-number {
            width: 252px;
            height: 111px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            transform: translate(15px, 0);
            border-left: 1px solid #e0e0e0;

            p:first-of-type {
                font-size: 22px;
                color: @primary-color;
            }
        }
    }

    ol.footer-infos {
        display: flex;
        transform: translate(-10px);
        margin-top: 20px;
        margin-bottom: 20px;

        li {
            color: #757575;
            margin-left: 10px;
            cursor: pointer;

            /*  &::after {
                content: "|";
                margin-left: 10px;
            } */

            &:hover {
                color: @primary-color;
            }
        }
    }
}

/* scrollToTop */
.scrollToTop {
    position: fixed;
    bottom: 80px;
    right: 0;
    width: 40px;
    height: 40px;
    background-color: @primary-color;
    border-radius: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all linear 0.8s;

    a {
        color: white;
    }
}

/* === 动画效果 === */
@keyframes scrollBtn {
    from {
        right: 0;
    }

    to {
        right: -40px;
    }
}

@keyframes slideDown {
    from {
        height: 0;
    }

    to {
        height: 100px;
    }
}